
<!DOCTYPE html>
<html>
<head>
	

	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>投票系统后台</title>
	<!--[if IE]>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<![endif]-->
	
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	<link rel="stylesheet" href="css/day/rendezvous.css">

	<script src="js/com/jquery-2.1.4.min.js"></script>
	<script src="js/js.js"></script>

</head>
<body>

<div class="header">
	<div class="top">
		<div class="company">
			<i class="logo"><img src="img/logo.png" alt="logo"></i>
			<a class="companyName" href="index.html">郭帅工作室</a>
			<!-- <span class="companyCode active"><i><img src="img/endCode.png" alt="验证"></i>已验证</span> -->
		</div>
		<div class="sign-out">
			<a href="javascript:;" class="sign-out-name">杨逸谋</a>，
			<a href="javascript:;" class="out">退出</a>
		</div>
	</div>
	<div class="nav-show">
		<div class="nav">
			<ul class="nav-ul">
				<li class="nav-li active"><a href="index.html">添加投票活动</a></li>
				<li class="nav-li"><a href="list.html">投票列表</a></li>
				<li class="nav-li"><a href="admin.html">报名管理</a></li>
			</ul>
			<!-- 下拉列表 <i class="nav-add"></i> -->
		</div>
	</div>
</div>
<div id="container">
	<div class="content">
		<div class="main">
			<!--工作台-->
			<div class="workbench">
				<table class="work-table" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td class="work-td" width="18%">
							<div class="work-td-border">
								<div class="work-admin">
									<div class="user-info">
										<a href="javascript:;"><img class="head-image" src="img/default-user.png" alt="用户头像"></a>
										<div class="user-detail">
											<a href="javascript:;" title="杨羊">杨羊</a>
											<div class="user-job" title="管理员">管理员</div>
										</div>
									</div>
									<div class="user-info work-nav">
										<ul class="work-nav-ul">
											<li class="work-nav-li active"><a href="index.html">添加投票活动</a></li>
											<li class="work-nav-li"><a href="list.html">投票列表</a></li>
											<li class="work-nav-li"><a href="admin.html">报名管理</a></li>
										</ul>
									</div>
									<div class="code">
										<div class="calendar_day">
											<div id="rendez-vous-french"></div>
										</div>

										<script src="js/day/syntaxhighlighter/shCore.js"></script>
										<script src="js/day/rendezvous.js"></script>
										<script src="js/day/app.js"></script>
									</div>
								</div>
							</div>
						</td>
						<td class="work-td work-td-show">
							<div class="work-td-border">
								<div class="work-main-title">
									<div class="left work-title">添加投票活动</div>
								</div>
								<div class="work-main-table">
									<div class="admin">
										<div class="admin-block">
											<label>*活动名字：</label>
											<div class="admin-text">
												<input type="text" placeholder="如何成为跟郭帅一样帅的男子">
											</div>
										</div>
										<div class="admin-block admin-time">
											<label>生效时间：</label>
											<div class="admin-text">
												<input type="text" class="date" value="12-02-2012"><i>至</i><input type="text"class="right date" value="12-02-2012">
											</div>
										</div>
										<div class="admin-block">
											<label>*关键字：</label>
											<div class="admin-text">
												<input type="text" placeholder="郭帅">
											</div>
										</div>
										<div class="admin-block">
											<label>*使用模版：</label>
											<div class="admin-text">
												<select>
													<option>郭帅生成标准版</option>
												</select>
											</div>
										</div>
										<div class="admin-block">
											<label>*图文封面(720-400)：</label>
											<div class="admin-text">
												<div class="admin-img"><img src="../images/1.jpg"></div>
												<div class="admin-file">
													<span>自定义</span>
													<input type="file" >
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*图片消息描述：</label>
											<div class="admin-text">
												<input type="text" placeholder="不知道">
											</div>
										</div>
										<div class="admin-block">
											<label>*头部图片(720-700)：</label>
											<div class="admin-text">
												<div class="admin-img"><img src="../images/1.jpg"></div>
												<div class="admin-file">
													<span>自定义</span>
													<input type="file" >
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*底部图片(720-auto)：</label>
											<div class="admin-text">
												<div class="admin-img"><img src="../images/1.jpg"></div>
												<div class="admin-file">
													<span>自定义</span>
													<input type="file" >
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*参赛规则：</label>
											<div class="admin-text">
											<script id="editor" type="text/plain" style="width: 750px; height: 300px;"></script>
											</div>
										</div>
										<div class="admin-block">
											<label>*票数设置：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="radio" name="radio">每日投N票(不能重复投给某人)
												</div>
												<div class="admin-radio">
													<input type="radio" name="radio">一次性投N票(不能重复投给某人)
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*每人每天最多投票次数：</label>
											<div class="admin-text">
												<input type="text" placeholder="10">
											</div>
										</div>
										<div class="admin-block">
											<label>*自动审核：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="checkbox" checked="checked">
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*详情页转发语：</label>
											<div class="admin-text">
												<input type="text" placeholder="我家萌娃">
											</div>
										</div>
										<div class="admin-block">
											<label>*一键关注连接：</label>
											<div class="admin-text">
												<input type="text" placeholder="www.baidu.com">
											</div>
										</div>
										<div class="admin-block">
											<label>*必须关注(非常重要)：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="checkbox"checked="checked">是否必须关注微值才能投票
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>是否显示统计：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="checkbox" checked="checked">
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>是否显示统计：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="checkbox" checked="checked">是否支持见面投票
												</div>
												<div class="admin-radio">
													<input type="checkbox" checked="checked">开启验证码(测试版)
												</div>
												<div class="admin-font">
													IP限制：（每天）<input type="text" value="500" class="input-200">全国号建议是每日投票的两至五倍，本地号建议为100倍。
												</div>
											</div>
										</div>
										<div class="admin-block">
											<label>*使用模版：</label>
											<div class="admin-text">
												<div class="admin-radio">
													<input type="checkbox" checked="checked">开启验证码(测试版)
												</div>
												<div class="admin-font">
													只允许地区<input type="text" value="500" class="input-200">
													多个地区以空格区分如 长沙 衡阳
												</div>
											</div>
										</div>
										<div class="admin-submit">
											<input type="button" value="保存"/>
											<input type="button" value="取消" class="active" />
										</div>
									</div>
								</div>
							</div>
						</td>
					</tr>					
				</table>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript" src="js/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="js/ueditor.config.js" charset="UTF-8"></script>
<script type="text/javascript" src="js/ueditor.all.min.js" charset="UTF-8"></script>
<script type="text/javascript" charset="utf-8" src="js/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">
	$(function (){
		$('.date').datetimepicker({
	        language:  'fr',
	        weekStart: 1,
	        todayBtn:  1,
			autoclose: 1,
			todayHighlight: 1,
			startView: 2,
			minView: 2,
			forceParse: 0
	    });
	});

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');


    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
    function getAllHtml() {
        alert(UE.getEditor('editor').getAllHtml())
    }
    function getContent() {
        var arr = [];
        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getContent());
        alert(arr.join("\n"));
    }
    function getPlainTxt() {
        var arr = [];
        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getPlainTxt());
        alert(arr.join('\n'))
    }
    function setContent(isAppendTo) {
        var arr = [];
        arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
        UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
        alert(arr.join("\n"));
    }
    function setDisabled() {
        UE.getEditor('editor').setDisabled('fullscreen');
        disableBtn("enable");
    }

    function setEnabled() {
        UE.getEditor('editor').setEnabled();
        enableBtn();
    }

    function getText() {
        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
        var range = UE.getEditor('editor').selection.getRange();
        range.select();
        var txt = UE.getEditor('editor').selection.getText();
        alert(txt)
    }

    function getContentTxt() {
        var arr = [];
        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
        arr.push("编辑器的纯文本内容为：");
        arr.push(UE.getEditor('editor').getContentTxt());
        alert(arr.join("\n"));
    }
    function hasContent() {
        var arr = [];
        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
        arr.push("判断结果为：");
        arr.push(UE.getEditor('editor').hasContents());
        alert(arr.join("\n"));
    }
    function setFocus() {
        UE.getEditor('editor').focus();
    }
    function deleteEditor() {
        disableBtn();
        UE.getEditor('editor').destroy();
    }
    function disableBtn(str) {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            if (btn.id == str) {
                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
            } else {
                btn.setAttribute("disabled", "true");
            }
        }
    }
    function enableBtn() {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
        }
    }

    function getLocalData () {
        alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
    }

    function clearLocalData () {
        UE.getEditor('editor').execCommand( "clearlocaldata" );
        alert("已清空草稿箱")
    }
</script>
</body>
</html>